doctype html
block declarations
    - var additional_title      = undefined;
    - var use_knockout          = false;
    - var use_angular           = false;
    - var include_validation    = false;
    - var include_remote        = true;
    - var body_id               = '';
    - var body_class            = '';
    - var angular_app           = undefined;
    - var angular_body_ctrl     = undefined;
    - var angular_body_class    = undefined;
html(lang="en",ng-app=angular_app)
    head
        if !additional_title
            title MediacenterJS
        else
            title MediacenterJS - #{additional_title}

        meta(name="theme-color" content="#484C52")
        meta(name="mobile-web-app-capable" content="yes")
        meta(name="apple-mobile-web-app-capable" content="yes")
        meta(name="apple-mobile-web-app-status-bar-style" content="black")
        meta(charset="utf-8")
        meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no")
        link(rel="apple-touch-icon", href="/core/css/img/logo.png")
        link(rel="icon", href="/core/css/img/logo.png", sizes="192x192")

        block additional_metadata

        // Core inclusion
        link(rel='stylesheet', href='/core/css/fonts/opensans.css')

        link(rel='stylesheet', href='/core/css/bootstrap.min.css')
        link(rel='stylesheet', href='/core/css/sweet-alert.css')
        link(rel='stylesheet', href='/core/css/style.css')
        link(rel='stylesheet', href='/core/css/icon.css')
        link(rel='stylesheet', href='/core/css/jquery-ui-1.10.3.custom.min.css')

        script(src="/core/js/plugins/jquery/jquery-1.8.2.min.js")
        script(src="/core/js/plugins/jquery/jquery-ui-1.10.3.min.js")

        if selectedTheme
            link(rel='stylesheet', href='/themes/' + selectedTheme +'/style.css')
            script(src='/themes/' + selectedTheme +'/script.js')

        block additional_css

        if use_knockout
            script(src="/core/js/plugins/knockout-2.3.0.js")

        if use_angular
            script(src="/core/js/plugins/angular/angular.min.js")
            script(src="/core/js/plugins/angular/angular-resource.min.js")
            script(src="/core/js/plugins/angular/angular-cookies.min.js")
            script(src="/core/js/plugins/angular/angular-sanitize.min.js")
            script(src="/core/js/plugins/angular/angular-route.min.js")
            script(src="/core/js/plugins/angular/angular-animate.min.js")
            script(src="/core/js/plugins/angular/angular-filter.js")
            script(src="/core/js/mcjs-core.js")

        script(src="/core/js/plugins/fastclick.js")
        script(src="/core/js/plugins/countries.js")
        script(src="/core/js/plugins/socket.io.min.js")
        script(src="/core/js/plugins/sweet-alert.min.js")
        script(src="/core/js/plugins/jquery/jquery.scrollintoview.min.js")
        script(src="/core/js/plugins/jquery/jquery.idle-timer.js")
        script(src="/core/js/plugins/jquery/jquery.i18n.properties.-1.0.9.js")

        if include_validation
            script(src="/core/js/plugins/jquery/jquery.prettyForm.js")
            script(src="/core/js/plugins/validation/jquery.validate.min.js")
            script(src="/core/js/plugins/validation/jquery.validate.defaults.js")
            script(src="/core/js/plugins/validation/jquery.validate.rules.js")

        if include_remote
            script(src="/core/js/jquery.remote.js")

            script.
                $(function(){
                    $('body').mcjsRemote();
                });

        script(src="/core/js/jquery.mcjs.core.js")

        //- This script prevents switching to Safari when clicking on a link in iOS
        script.
            $(function() {
                if(navigator.userAgent.match(/(iPhone|iPod|iPad)/i)) {
                    $('a').click(function(e) {
                        e.preventDefault();
                        document.location = $(this).attr('href');
                        return false;
                    });
                }

                window.addEventListener('load', function() {
                    FastClick.attach(document.body);
                }, false);
            });

        block additional_scripts


body(id=body_id, class=body_class,ng-controller=angular_body_ctrl,ng-class=angular_body_class)
    block body

